package com.massimilla.rpg;

import java.util.*;

public class Main {

	public static void main(String[] args) {
		boolean alive = true;
		// Receiving player input
		System.out.println("Please enter your name.");
		Scanner input = new Scanner(System.in);
		final String name = input.next();
		boolean loop = true;
		Player playerClass = new Player();
		
		String stringClass = null;
		while (loop == true) {
			loop = true;
			System.out
					.println("Please choose to either be a guard, a knight, or a mage.");
			stringClass = input.next();
			if (stringClass.equalsIgnoreCase("knight")
					|| stringClass.equalsIgnoreCase("guard")
					|| stringClass.equalsIgnoreCase("mage")) {
				loop = false;
			} else {
				System.out.println("Please choose a valid class.");
			}
		}
		// Setting of player name
		Player player = null;
		if (stringClass.equalsIgnoreCase("knight")) {
			player = new Knight(name);
		} else if (stringClass.equalsIgnoreCase("guard")) {
			player = new Guard(name);
		} else if (stringClass.equalsIgnoreCase("mage")) {
			player = new Mage(name);
		}
		// Giving player their statistics
		System.out.println("Your health is " + player.getMax_hp());
		System.out.println("Your mana is " + player.getMax_mp());
		System.out.println("Your strength is " + player.getStr());
		System.out.println("Your magic strength is " + player.getMp_str());
		System.out.println("Your defense is " + player.getDef());
		System.out.println("You have " + player.getGold() + " gold and "
				+ player.getPotions() + " potions.");
		System.out.println("Time to begin your endless battle!");
		while(alive == true){
			Monster monster = new Monster();
			System.out.println("You have encountered a hostile" + monster.getNameMob());
		}
	}
}